<div id="sidebar">
	<?php if($this->tank_auth->is_out_of_office()){ ?>
	<div id="punches" class="widget">
		<?php
			$p = $this->Punches_db->getLastPunch(array('user_id'=>$this->tank_auth->get_user_id()));
			$in = false;
			if(!count($p))
				$in = true;
			else if($p['is_in_or_out'])
				$in = false;
			else
				$in = true;
		?>
		<input id="punch-in" class="punch-in" type="button" <?php if(!$in) echo 'disabled="disabled" style="background-color:#ccc;"'; ?> value="PUNCH IN" title="PUNCH IN" />
		<input id="punch-out" class="punch-out" type="button" value="PUNCH OUT" <?php if($in) echo 'disabled="disabled" style="background-color:#ccc;"'; ?> title="PUNCH OUT" />
		<div class="clear"></div>
	</div>
	<!--widget-->
	<?php } ?>

	<div id="announcement" class="widget curve">
		<h4 class="header">Announcements</h4>
		<div class="section">
			<?php
				$dt = $this->Default_db->getAnnouncements();
				foreach($dt as $d)
				{
					echo "<div id='row'>";
					echo "	<div class='img'>";
					if($d['image_id'])
						echo "		<img src='".base_url()."home/viewimage/".$d['image_id']."' title='No Image' alt='No Image' width='50' />";
					else
						echo "		<img src='".base_url()."css/images/default.jpg' title='No Image' alt='No Image' width='50' />";
					echo "	</div>";
					echo "	<div class='desc'>";
					echo "		<h4>".$d['subject']."</h4>";
					echo "		<p class='author'><i>".$d['firstname']." ".$d['lastname']."</i></p>";
					echo "		<p class='author'><i>".$this->members_pi->convertDateDisplay($d['modified'])."</i></p>";
					echo "		<p class='announcement'>".nl2br($d['announcement'])."</p>";
					echo "	</div>";
					echo "	<div class='clear'></div>";
					echo "</div>";
				}
			?>			
		</div>
		<!--section-->
	</div>
	<!--widget-->
	
	<div id="team-status" class="widget curve">
		<h4  class="header">Team Status</h4>
		<div class="section">
		Coming soon...
		</div>
	</div>
	<!--widget-->
	
</div>
<!--sidebar-->

<div class="clear"></div>